-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add always_raise_on_error config option #1450
base: master
Are you sure you want to change the base?
Conversation
a92fe2f
to
a62ff8c
Compare
…ns still don't work correctly
@@ -52,7 +52,7 @@ has been destroyed. | |||
# PT supports request_store versions for 3 years. | |||
s.add_dependency "request_store", "~> 1.4" | |||
|
|||
s.add_development_dependency "appraisal", "~> 2.4.1" | |||
s.add_development_dependency "appraisal", "~> 2.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was necessary because i couldn't run appraisal
locally with ruby-3.2.2
- i think this fix is what got it working again
This PR has been automatically marked as stale due to inactivity. |
is there any chance of getting this looked at? silently not saving version data is a pretty serious issue imho. |
This PR has been automatically marked as stale due to inactivity. |
still not stale, still waiting for maintainers to chime in. or alternately i'm happy to help out if someone wants to add permissions. |
Thanks for your contribution.
How about extracting private method(s)? |
hi @jaredbeck
this would be a breaking change because of how the existing code works since currently an error is raised when creating but not updating. if that's ok then i'm happy to make the change. |
done. |
NOTE: all the specs pass locally but rubocop is failing on a complexity check - i'm unsure exactly how to simplify this code to satisfy rubocop without making the intent less clear. happy to hear suggestions? for now i've disabled the check around the offending method
Currently when creating a new versioned record an error is raised if the
Version
cannot be created - this is because#save!
is used:paper_trail/lib/paper_trail/record_trail.rb
Line 62 in 47dbc22
However, when updating, using
update_columns
, or destroying a versioned record no error is raised if theVersion
cannot be created:paper_trail/lib/paper_trail/record_trail.rb
Line 111 in 47dbc22
paper_trail/lib/paper_trail/record_trail.rb
Line 301 in 47dbc22
paper_trail/lib/paper_trail/record_trail.rb
Line 84 in 47dbc22
This pr adds a
always_raise_on_error
global config option. When set, all of the above failures will raise an error.Fixes #1449
Thank you for your contribution!
Check the following boxes:
master
(if not - rebase it).code introduces user-observable changes.
and description in grammatically correct, complete sentences.